package com.antis.olsl.data.adapter;

import com.antis.olsl.data.R;
import com.antis.olsl.data.response.GetBrandInventoryListResp;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class BrandQueryAdapter extends BaseQuickAdapter<GetBrandInventoryListResp.ContentBean.BrandListBean, BaseViewHolder> implements LoadMoreModule {
    public BrandQueryAdapter(int layoutResId, @Nullable List<GetBrandInventoryListResp.ContentBean.BrandListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, GetBrandInventoryListResp.ContentBean.BrandListBean item) {
        baseViewHolder.setText(R.id.text_product_code, item.brandCode);
        baseViewHolder.setText(R.id.text_product_name, item.brandName);
        baseViewHolder.setText(R.id.text_store_num, item.smallStocks + "");
        baseViewHolder.setText(R.id.text_profit_grade, item.stocks + "");
    }
}
